<template>
    <div class="error_main">
        <div class="error_child">
            <span class='error_child_item'>500</span><br/>
            <span class='error_child_item2' v-if="errorMsg==''">授权失败，请重新登陆</span>
            <span class='error_child_item2' v-else>{{errorMsg}}</span>
        </div>
        
         <el-button type="primary" @click="relogin" style="margin-top:50px">重新登陆</el-button>
    </div>
</template>
<script>
export default {
    data(){
        return{
            errorMsg:""
        }
    },
    created(){
       
        if(this.$route.query.error)
            this.errorMsg=this.$route.query.error;
        this.errorMsg=this.errorMsg.replace("505:","")
    },
    methods:{
        relogin(){
            let isApp=localStorage.getItem("isApp");
            let isAppTop=localStorage.getItem("isAppTop");
            let sCode=localStorage.getItem("sCode");
            let filenames=localStorage.getItem("filenames");
            window.location.href="/#/login?sCode="+sCode+"&isApp="+isApp+"&isAppTop="+isAppTop+"&filenames="+filenames
        }
    }
}
</script>
<style scoped>
.error_main{
    display:flex;
    flex-direction: column;
    height:100VH;
    justify-content: center;
    align-items: center;
}
.error_child{
    text-align: center;
}
.error_child_item{
    font-size:200px;
    /*color:#e1effd;*/
    color:#74b9fd;
}


.error_child_item2{
    font-size:50px;
    color:#74b9fd;
}
</style>